Moving Average


Moving Average

Moving average

MovingAverage

Problem 1
Create a program called MA to compute the moving average of a series.

MARun

MA.cpp
...

void MA::Window_Open(Win::Event& e)
{
}

void MA::tbxInput_Change(Win::Event& e)
{
     valarray<double> input;
     valarray<double> output;
     Sys::Convert::ToVector(tbxInput.Text, input);
     Math::Statistics::MovingAverage(input, 3, output);
     wstring text;
     Sys::Convert::ToString(output, text);
     tbxOutput.Text = text;
}



Remove DC

In audio applications, it is necessary to remove the DC level (or offset). The figure below illustrates how to remove the DC level (frequency = 0). In Wintempla, you can use the IIR::DcRemover class to remove DC.
En las aplicaciones de audio, es necesario remover el nivel de CD (o offset). La figura de abajo muestra cómo remover el nivel de CD (frecuencia = 0). En Wintempla, usted puede usar la clase IIR::DcRemover para remover el nivel de DC.

RemoveOffset

© Copyright 2000-2021 Wintempla selo. All Rights Reserved. Jul 22 2021. Home